package com.tt.vtg.service.impl;

import javax.annotation.Resource;

import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;

import com.tt.vtg.dao.mongo.entity.ExpJsonToken;
/**
 * Create record in mongodb to store logout/invalid and any unused token, 
 * and those token will be removed after ?? minutes, the mechanism 
 * is setting in mongodb. 
 * 
 * @author raooolih
 *
 */
//@Service
public class ExpTokenMgmt {
	@Resource(name="primaryMongoTemplate")
	private MongoTemplate mogoTemp;
	
	public void create(String token){
		ExpJsonToken et = new ExpJsonToken();
		et.setToken(token);
		mogoTemp.insert(et);
	}
}
